#ifndef COMIOCONTROLLER_H
#define COMIOCONTROLLER_H

#include <QObject>
#include <QString>
#include <QTextStream>
#include <stdio.h>

using namespace std;

enum MSG_LEVEL {
    MSG_DEBUG,
    MSG_INFO,
    MSG_WARNING,
    MSG_ERROR,
    MSG_FATAL
};



class ComIOController : public QObject
{
    Q_OBJECT
public:
    void msgOutput(QString msg, MSG_LEVEL level = MSG_INFO);
    void getInput(QString& buffer);

signals:

public slots:


private:
    QTextStream cin;

    QTextStream cout;

    QTextStream cerr;


//singleton
public:
    static ComIOController* getInstance();
private:
    explicit ComIOController(QObject *parent = 0);
    static ComIOController* _instance;


};

#endif // COMIOCONTROLLER_H
